package _9

import (
	"strings"
)

/*
时间复杂度：O(N)
空间复杂度：O(1)

*/
func capitalizeTitle(title string) string {
	ans := strings.Split(title, " ")
	for i, v := range ans {
		v = strings.ToLower(v)
		if len(v) > 2 {
			v = strings.Title(v)
		}
		ans[i] = v
	}
	return strings.Join(ans, " ")
}
